home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 4 / Gold Medal Software - Volume 4 (Gold Medal) (1994).iso / os2 / pig_10.arj / INSTALL.CMD next >
OS/2 REXX Batch file  |  1994-08-08  |  2KB  |  67 lines

  1. /**********************************************************************
  2.  *
  3.  * Personal Inventory Gatherer/2 installation program.
  4.  *
  5.  * Vesion 1.0
  6.  * August 8, 1994
  7.  *
  8.  * Copyright (C) 1994 by 
  9.  * James E Johnson Jr.
  10.  * All Rights Reserved.
  11.  *
  12.  **********************************************************************/
  13.  
  14.  
  15. "@ECHO OFF"
  16.  
  17. call RxFuncAdd "SysLoadFuncs", "RexxUtil", "SysLoadFuncs"
  18. call SysLoadFuncs
  19. call RxFuncAdd "SysCls", "RexxUtil", "SysCls"
  20.  
  21. arg FullPathName
  22.  
  23. if FullPathName = "" then
  24.   do
  25.     call SysCls
  26.     say ""
  27.     say "Usage:"
  28.     say " "
  29.     say "  INSTALL FullPathName"
  30.     say ""
  31.     say "  FullPathname is a combination of both the drive letter and directory path,"
  32.     say "  if the directory does not exist it will be created."
  33.     say ""
  34.     say ""
  35.     say "  Example:"
  36.     say ""
  37.     say "  INSTALL c:\apps\pig                   -- will install PIG/2 in c:\apps\pig"
  38.   end
  39. else
  40.   do
  41.     call SysCls
  42.     say "Installing Personal Inventory Gatherer/2 in "FullPathName"."
  43.     rc = SysFileTree( FullPathName, "dirs", "D")
  44.     if (dirs.0 = 0) then
  45.       do
  46.         rc = SysMkDir(FullPathName)
  47.         if (rc \= 0) then
  48.           do
  49.             say "Couldn't create directory "FullPathName"."
  50.           exit
  51.         end
  52.       end
  53.     copy pig.exe     FullPathName ">NUL"
  54.     copy pig.hlp     FullPathName ">NUL"
  55.     copy pig.doc     FullPathName ">NUL"
  56.     copy install.cmd FullPathName ">NUL"
  57.     rc = SysFileTree( "pig.key", "files", "F")
  58.     if (files.0 \= 0) then
  59.       do
  60.         copy pig.key FullPathName ">NUL"
  61.       end
  62.     CR = D2C(13)
  63.     rc = SysCreateObject("WPProgram", "Personal"CR" Inventory"CR" Gatherer/2", "<WP_DESKTOP>", "PROGTYPE=PM;EXENAME="FullPathname"\pig.exe", "REPLACE")
  64.     say "Installation complete."
  65.   end
  66.  
  67.